<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title> World Street Map</title>
    <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.0/js/dojo/dijit/themes/tundra/tundra.css">
    <style>
      html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
      #mapcontainer{display:none; position:absolute; top: 100px; left: 300px;}
    </style>
    <script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.0"></script>
    <script type="text/javascript">
      dojo.require("dijit.layout.BorderContainer");
      dojo.require("dijit.layout.ContentPane");
      dojo.require("esri.map");
      var map;
      function init() {
        var initExtent = new esri.geometry.Extent({"xmin":-17731,"ymin":6710077,"xmax":-12495,"ymax":6712279,"spatialReference":{"wkid":102100}});
        map = new esri.Map("map",{extent:initExtent});
        //Add the world street map layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service    
        var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
        map.addLayer(basemap);  
        //resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
        //the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm
        var resizeTimer;
        dojo.connect(map, 'onLoad', function(theMap) {
          dojo.connect(dijit.byId('map'), 'resize', function() {  //resize the map if the div is resized
            clearTimeout(resizeTimer);
            resizeTimer = setTimeout( function() {
              map.resize();
              map.reposition();
            }, 500);
          });
        });
      }

      openMap = function(){
		//dojo.byId("mapcontainer");
  		dojo.style("mapcontainer", "display", "block")
      }
      dojo.addOnLoad(init);
    </script>
  </head>
  
  <body class="tundra">
    <div id="mapcontainer" dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width:600px;height:600px;margin: 0;">
      <div id="heading" dojotype="dijit.layout.ContentPane" region="top" style="overflow:hidden;">
      	MAP HEADER
      </div>
      <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;">
      </div>
    </div>
    <button onclick="openMap();">Show Map</button>
  </body>

</html>